<!DOCTYPE html>
<html>
<head>
<title>会员信息审核</title>
<link href="${request.getContextPath()}/Public/assets/admin/css/css.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/plugins/font-awesome/css/font-awesome.min.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/plugins/simple-line-icons/simple-line-icons.min.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/plugins/bootstrap/css/bootstrap.min.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/plugins/uniform/css/uniform.default.css"
	rel="stylesheet" type="text/css">

<link
	href="${request.getContextPath()}/Public/assets/global/css/components-rounded.css"
	id="style_components" rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/css/plugins.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/admin/css/layout.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/admin/css/themes/default.css"
	rel="stylesheet" type="text/css" id="style_color">
<link
	href="${request.getContextPath()}/Public/assets/admin/css/custom.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/plugins/bootstrap-datepicker/css/bootstrap-datepicker.min.css"
	rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css"
	href="${request.getContextPath()}/Public/assets/global/plugins/jquery-notific8/jquery.notific8.min.css" />
<link
	href="${request.getContextPath()}/Public/assets/admin/css/common.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/assets/global/css/kkpager.css"
	rel="stylesheet" type="text/css">
<link rel="shortcut icon"
	href="${request.getContextPath()}/Public/favicon.ico">

<!-- 时间插件 -->
<link
	href="${request.getContextPath()}/Public/js/jqueryUI/css/jquery-ui.min.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/js/jqueryUI/css/jquery-ui-timepicker-addon.min.css"
	rel="stylesheet" type="text/css">
<link
	href="${request.getContextPath()}/Public/js/jqueryUI/css/jquery.datetimepicker.css"
	rel="stylesheet" type="text/css">

<!-- select2控件样式 -->
<link
	href="${request.getContextPath()}/Public/assets/global/plugins/select2/select2.css"
	rel="stylesheet" type="text/css">

<!-- layer web弹层组件样式 -->
<link
	href="${request.getContextPath()}/Public/js/layer/skin/layer.css"
	rel="stylesheet" type="text/css">
	
<!-- pandora-dialog 弹层组件样式 -->
<link
	href="${request.getContextPath()}/Public/js/pandora/css/dialog.css"
	rel="stylesheet" type="text/css">
<script>
	BASE_URL = '${request.getContextPath()}'
</script>
<style type="text/css">
.datepicker {
	font-size: 16px;
}

.datepicker td, .datepicker th {
	width: 14.28571428571429%;
	height: 40px;
}

.table-condensed {
	width: 100%;
}

.datepicker-inline {
	width: 100%;
}

.col-md-3, .col-md-6 {
	padding-right: 0px;
	padding-left: 0px;
}
 *
    {
        font-size: 14px;
    }
    #buyfrom label.error
    {
        color: Red;
        font-size: 13px;
        margin-left: 5px;
        padding-left: 16px;
        background:  left no-repeat;
    }
    .commonBtn{
    	margin: 0 5px;
    }
    .normalBtn{
    	border: 1px solid #C0C1B4; color:#555; background-color:#fff;
    }
</style>


</head>

<body class="page-header-top-fixed page-footer-fixed">
	<!--头部信息结束 -->
	<div class="page-header">
		<!--头部开始-->
		<#include "/include/top.html" />
		<!-- 头部信息结束 -->
	</div>
	<!-- END HEADER -->


	<!-- BEGIN PAGE CONTAINER -->
	<div class="page-container">
		<#include "/include/menu.html" />
		<!-- 首页内容开始 -->
		<div class="page-content-wrapper">
			<div class="page-content">
				<div class="container-fluid" id="indexContext">
					<form action="${request.getContextPath()}/vip/vipList.do" id="timeFrom" method="post">
						<div align="left" style="height: 80px; width: 100%;">
							<input type="hidden"  id="auditStatus"  name="auditStatus" value="${(status)!}">
							<div style="float: left;" class="col-md-7">
								<div class="btn-group btn-group-justified" > 
									<a href="#"   auditStatus="9" onclick="commodity(-1,this)" <#if status??  &&status==-1>class="btn red" <#else> class="btn btn-default"</#if> > 全部 </a>
									<a href="#"   auditStatus="0" onclick="commodity(0,this)" <#if status??  &&status==0>class="btn red" <#else>class="btn btn-default"</#if> > 待审核 </a>
									<a href="#"   auditStatus="3" onclick="commodity(1,this)" <#if  status??  &&status==1>class="btn red" <#else>class="btn btn-default"</#if> > 已通过 </a>
									<a href="#"   auditStatus="1" onclick="commodity(2,this)" <#if  status??  &&status==2>class="btn red" <#else>class="btn btn-default"</#if> > 已关闭</a>
								</div>
							</div>
							<div style="float: right;" class="col-md-5">
								<label>注册时间:
									<input type="search" class="form-control input-small2 input-inline " placeholder="开始时间" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" onchange="queryDataByTime();" name="statusDate" id="statusDate" value="${statusDate!''}" readonly="readonly">
								</label> - 
								<label>
									<input type="search" class="form-control input-small2 input-inline " placeholder="结束时间" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" onchange="queryDataByTime();" name="endDate" id="endDate" value="${endDate!''}" readonly="readonly">
								</label>
							</div>
						</div>
						<!-- <div align="center" style="height: 80px;">
							<table
								class="table table-striped table-bordered table-hover ttTbl">
								<tr >
									<td align="right">邮箱 /用户名:</td>
									<td align="center"><input type="text"  id="userNames" name="userName" value="${(user.userName)!}" /></td>
									<td align="right">企业名称:</td>
									<td align="center"><input type="text" id="companyName" name="companyName" value="${(user.companyName)!}"  /></td>
									<td align="right">手机号码:</td>
									<td align="center"><input type="text" id="mobilePhone" name="mobilePhone" value="${(user.mobilePhone)!}"  /></td>
									<td align="right">银行帐号:</td>
									<td align="center"><input type="text"  id="bankNO"  name="bankNO"  value="${(user.bankNO)!}"  /></td>
									<td align="center"><input type="submit" class="btn red" value="搜索"></td>
								</tr>
							</table>
						</div> -->
						<label>邮箱/用户名:<input type="text"
							class="form-control input-small2  input-inline"
							placeholder="邮箱/用户名" name="userName" id="userName"
							value="${(user.userName)!}" > 
						</label>
						
						<label>企业名称:<input
								type="search"
								class="form-control input-small2  input-inline"
								placeholder="企业名称" name="companyName" id="companyName"
								 value="${(user.companyName)!}" >
						</label> 
						
						<label>手机号码:<input type="search"
								class="form-control input-small2  input-inline"
								placeholder="手机号码" name="mobilePhone" id="mobilePhone"
								value="${(user.mobilePhone)!}">
						</label> 
						
						<label>银行号码:<input type="search"
								class="form-control input-small2 input-inline"
								placeholder="银行号码" id="bankNO"  name="bankNO"  value="${(user.bankNO)!}"  >
						</label>
						
						<button class="btn red" type="submit">
							<i class="fa fa-search"></i> 搜索
						</button>
					</form>
					<div align="center">
						<table class="table table-striped table-bordered table-hover ttTbl">
							<tr align="center">   
								<th width="10%">会员ID</th>
								<th width="10%">邮箱/用户名</th>
								<th width="10%">商城帐号</th>
								<th width="10%">公司名</th>
								<th width="10%">注册时间</th>
								<th width="10%">最后登录</th>
								<th width="10%">登录次数</th>
								<th width="10%">附属账号</th>
								<th width="10%">状态</th>
								<th width="10%">操作</th>
							</tr>
						<#list list as vip>
						<tr>
							<td>${(vip.userId)!}</td>
								<td>${(vip.userName)!}</td>
								<td>${(vip.mallId)!}</td>
								<td>${(vip.companyName)!}</td>
								<td>${(vip.registerTime)!}</td>
								<td>${(vip.lastLoginTime)!}</td>
								<td>${(vip.loginNum)!"0"}</td>
								<td>${(vip.userAccountNo)!}</td>
								<td>
								<#if vip?? &&  vip.auditStatus?? &&  vip.auditStatus==0>
								待审核
								</#if>
								<#if vip?? &&  vip.auditStatus?? &&  vip.auditStatus==1>
								已通过
								</#if>
								<#if vip?? &&  vip.auditStatus?? &&  vip.auditStatus==2>
								已关闭
								</#if>
								</td>
								<td><a href="javascript:vipDetaials(${(vip.userId)!})">查看详情</a></td>
						</tr>
						</#list>
						</table>
						<div style="width:80%;margin:0 auto;">
										<div id="kkpager">
											<input type="hidden" value="${totalPage!''}" id="totalPage">
											<input type="hidden" value="${totalRecords!''}" id="totalRecords">
										</div>
						</div>
					</div>
				
				</div>
			</div>
		</div>
		<!-- END PAGE CONTENT -->
	</div>
	<#include "/include/foot.html" />

<script
	src="${request.getContextPath()}/Public/assets/global/plugins/jquery.min.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/jquery-migrate.min.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/jquery-ui/jquery-ui.min.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/bootstrap/js/bootstrap.min.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/jquery.blockui.min.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/jquery.cokie.min.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/uniform/jquery.uniform.min.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/jquery-notific8/jquery.notific8.min.js"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/jquery.sparkline.min.js"
	type="text/javascript"></script>

<!-- <script
	src="${request.getContextPath()}/Public/assets/global/plugins/bootstrap-datepicker/js/bootstrap-datepicker-index.js"
	type="text/javascript"></script> -->
<!-- 时间插件 -->
<script
	src="${request.getContextPath()}/Public/js/jqueryUI/jquery.ui.custom.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/js/jqueryUI/jquery.ui.datepicker.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/js/jqueryUI/jquery.ui.datepicker-zh-CN.js"
	type="text/javascript"></script>
	

<script
	src="${request.getContextPath()}/Public/assets/global/scripts/metronic.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/admin/scripts/layout.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/admin/scripts/commonUtils.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/highcharts.js"
	type="text/javascript"></script>
<script
	src="${request.getContextPath()}/Public/assets/global/plugins/kkpager.min.js"
	type="text/javascript"></script>
<script type="text/javascript"
	src="${request.getContextPath()}/Public/My97DatePicker/WdatePicker.js"></script>
<script src="${request.getContextPath()}/Public/js/moment/moment.js"
	type="text/javascript"></script>


<!-- select2控件 -->
<script type="text/javascript"
	src="${request.getContextPath()}/Public/assets/global/plugins/select2/select2.js"></script>
<script type="text/javascript"
	src="${request.getContextPath()}/Public/assets/global/plugins/select2/select2_locale_zh-CN.js"></script>

<!-- layer web弹层组件-->
<script type="text/javascript"
	src="${request.getContextPath()}/Public/js/layer/layer.min.js"></script>
	
<!-- pandora-dialog 弹层组件 -->
<script type="text/javascript"
	src="${request.getContextPath()}/Public/js/pandora/pandora-dialog.js"></script>

	<script>

		jQuery(document).ready(function() {

			Metronic.init();
			Layout.init();
			toPage();
		});
		
		
		//分页
		function toPage(){
			function getParameter(name) {
				var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
				var r = window.location.search.substr(1).match(reg);
				if (r != null)
					return unescape(r[2]);
				return null;
			}
			
			var totalPage = $('#totalPage').val();
			var totalRecords = $('#totalRecords').val();
			
			var  auditStatus=$("#auditStatus").val();
			var  statusDate=$("#statusDate").val();
			var  endDate=$("#endDate").val();
			var  userName=$("#userName").val();
			var  companyName=$("#companyName").val();
			var  mobilePhone=$("#mobilePhone").val();
			var  bankNO=$("#bankNO").val();
			

			var pageNo = getParameter('pno');
			if (!pageNo) {
				pageNo = 1;
			}
			
			//生成分页
			//有些参数是可选的，比如lang，若不传有默认值
			kkpager.generPageHtml({
				pno : pageNo,
				//总页码
				total : totalPage,
				//总数据条数
				totalRecords : totalRecords,
		
				getLink : function(n) {

					return this.hrefFormer + this.hrefLatter + "?pno=" + n+"&auditStatus="+auditStatus+"&statusDate="+statusDate+"&endDate="+endDate+"&userName="+userName+"&companyName="+companyName+"&mobilePhone"
						+mobilePhone+"&bankNO="+bankNO;
				}
			});
		}

		
		
		function  vipDetaials(obj){
			
		window.location.href="${request.getContextPath()}/vip/vipDetails.do?userId="+obj;	
		
		}
		
		function  commodity(status,obj){
			var prodclasss=document.getElementsByName("prodclass");
			$("input[name='prodclass']").removeClass("green");
			
			$(obj).addClass("green");
			
			$("#auditStatus").val(status);
			$("#timeFrom").submit();
			//window.location.href="${request.getContextPath()}/vip/vipList.do?auditStatus="+status;
	    }
		
		
		
		function  timeQuery(){
			$("#timeFrom").submit();	
			
		}
		/*
		$("#statusDate").datepicker({
			changeYear: true,
			changeMonth: true,
			yearRange:"2015:2050",
			prevText: '<',
			nextText: '>',
			onSelect:function(dateText,inst){
				var endText=AddDays(dateText);
				$("#endDate").datepicker("option","minDate",dateText);
				$("#endDate").datepicker("option","maxDate",endText);
				$(this).focus();
				$(this).blur();
			}
		});
		
		$("#endDate").datepicker({
			changeYear: true,
			changeMonth: true,
			yearRange:"2015:2050",
			prevText: '<',
			nextText: '>',
			beforeShow: function() {
				var query=$("#statusDate").val();
				var dateText=AddDays(query);
				$("#endDate").datepicker("option","maxDate",dateText);
			},
			onSelect:function(dateText,inst){
				$("#statusDate").datepicker("option","maxDate",dateText);
				$(this).focus();
				$(this).blur();
				queryDataByTime();
			}
		});*/
		
		//注册时间查询数据
		function queryDataByTime(){
			$("#timeFrom").submit();
			
			/* var startTime = $("#startTime").val();
			var endTime = $("#endTime").val();
			
			$("tbody").empty();
			alert($("#startTime").val()+";;;;;;;"+$("#endTime").val());
			$.ajax({
				url : "${request.getContextPath()}/accountAudit/accountList.do",
				type : "post",
				dataType:'JSON',
				data:{"startTime":startTime,"endTime":endTime}
			}); */
		}
		
		
		function AddDays(date){
			var nd = new Date(date);
			nd.setDate(nd.getDate()+36500);//最长间隔多少天  
			var y = nd.getFullYear();
			var m = nd.getMonth()+1;
			var d = nd.getDate();
			if(m <= 9) m = "0"+m;
			if(d <= 9) d = "0"+d; 
			var cdate = y+"-"+m+"-"+d;
			return cdate;
		}
	</script>
</body>
</html>
